cmake_minimum_required(VERSION 3.5)
project(MyPraseXML)

if(CMAKE_COMPILER_IS_GNUCXX)
    set(CMAKE_CXX_FLAGS "-std=c++11 ${CMAKE_CXX_FLAGS}")
    message(STATUS "optional:-std=c++11")   
endif(CMAKE_COMPILER_IS_GNUCXX)

SET(CMAKE_BUILD_TYPE "Debug")
SET(CMAKE_CXX_FLAGS_DEBUG "$ENV{CXXFLAGS} -O0 -Wall -g -ggdb")
SET(CMAKE_CXX_FLAGS_RELEASE "$ENV{CXXFLAGS} -O3 -Wall")

set(SRC "./src/tinyxml2.cpp" 
        "./src/parserxml.cpp"
        )
include_directories(./inc)

add_executable(praseXML main.cpp ${SRC})

target_link_libraries(praseXML -lpthread)

set(EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/bin)

file(COPY ./template.xml DESTINATION ${EXECUTABLE_OUTPUT_PATH})